package com.ktjy.demo.web;

import com.ktjy.demo.comm.Ktjiaoyulnfo;
import com.ktjy.demo.service.DemoService;
import jakarta.annotation.Resource;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Description TODO
 * @Author 李琪
 * @Date 2025/1/3 10:17
 **/
@RestController
public class HelloController {
    @Value("${com.ktjy.name}")
    private String name;
    @Value("${com.ktjy.email}")
    private String email;
    @Autowired
    private DemoService demoService;
    @Resource
    private Ktjiaoyulnfo ktjiaoyulnfo;
    @RequestMapping("/hello")
    public String hello(){
        String msg=demoService.asyHello();
        msg+=" "+ktjiaoyulnfo.getName()+" "+ktjiaoyulnfo.getEmail();
        return msg;
    }
}
